package xyz.xdxx152.springsecuritydemo.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

@Controller
public class LoginController {

    @RequestMapping(value = "/toMain",method = RequestMethod.POST)
    public String toMain(@RequestParam String username,
                       @RequestParam String password){
        System.out.println("进入到了业务逻辑");
        return "redirect:/main.html";
    }
}
